<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<input id="menuInput1" class="layui-input" style="width:200px;" type="text" name="xxxx" placeholder="请输入">
		<br>
		<input id="menuInput2" class="layui-input" style="width:200px;" type="text" name="xxxx" placeholder="请输入">
		<script type="text/javascript" src="jquery.js"></script>
		<script type="text/javascript" src="cascader.js"></script>
		<script>
			$(document).ready(function() {
				var demoData = [{
						name: "菜单1",
						id: "1",
						child: [{
							name: "菜单1-1",
							id: "1-1",
							child: [{
								name: "菜单1-1-1",
								id: "1-1-1",
							}]
						}]
					},
					{
						name: "菜单2",
						id: "2",
						child: [{
								name: "菜单2-1",
								id: "2-1",
								child: [{
										name: "菜单2-1-1",
										id: "2-1-1",
									},
									{
										name: "菜单2-1-2",
										id: "2-1-2",
									},
								]
							},
							{
								name: "菜单2-2",
								id: "2-2",
							},
						]
					},
					{
						name: "菜单3",
						id: "3",
						child: [{
							name: "菜单3-1",
							id: "3-1",
							child: [{
								name: "菜单3-1-1",
								id: "3-1-1",
							}]
						}]
					}
				]
				
				console.log(JSON.stringify(demoData))

				cascaderInit("menuInput1", demoData)
				cascaderInit("menuInput2", demoData)

			});
		</script>
	</body>
</html>
